package com.xuzimian.demo.java.proxy.dynamic.performance.handler

import net.sf.cglib.proxy.MethodInterceptor
import net.sf.cglib.proxy.MethodProxy
import java.lang.reflect.Method

class CglibHandler(private val target: Any) : MethodInterceptor {
    @Throws(Throwable::class)
    override fun intercept(proxy: Any, method: Method, args: Array<Any>,
                           methodProxy: MethodProxy): Any {
        return methodProxy.invoke(target, args)
    }

}